package com.ohos.connect.devicecloud.mqtt.modular.coap.api;

import com.ohos.connect.devicecloud.mqtt.api.CoapApi;
import com.ohos.connect.devicecloud.mqtt.core.model.dto.CoapToHttpDTO;
import com.ohos.connect.devicecloud.mqtt.core.model.vo.CoapToHttpVO;
import com.ohos.connect.devicecloud.mqtt.modular.coap.service.CoapService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service("coapApi")
public class CoapApiImpl implements CoapApi {

    @Resource
    private CoapService coapService;

    @Override
    public CoapToHttpVO sendCoapMessage(CoapToHttpDTO coapToHttpDTO) {
        return coapService.httpToCoapMethod(coapToHttpDTO);
    }
}
